#if !defined(APP_MQTT_H)
#define APP_MQTT_H

#define ADDRESS "tcp://192.168.11.52:1883"
#define CLIENTID "b253ba38-daf6-4b37-984f-5d8fdc6a1cfa"
#define TOPIC_R2G "REMOTE_TO_GATEWAY" // 接收远程消息的主题
#define TOPIC_G2R "GATEWAY_TO_REMOTE" // 发送消息给远程的主题
#define PAYLOAD "Hello World!"
#define QOS 1
#define TIMEOUT 10000L


//1.初始化mqtt
int app_mqtt_init(void);

//2.关闭mqtt客户端
void app_mqtt_close(void);

//3.发送消息给远程服务器
int app_mqtt_send(char *json);

//4.注册接收处理远程消息的函数
void app_mqtt_registerRecvCallback(int (*callback)(char *json));

#endif // APP_MQTT_H
